Skip to content

nixos/binfmt: correctly handle argv0 when preserveArgvZero#118926

Closed
oxalica wants to merge 2 commits intoNixOS:masterfrom
oxalica:fix/binfmt-argv0
Closed

nixos/binfmt: correctly handle argv0 when preserveArgvZero#118926
oxalica wants to merge 2 commits intoNixOS:masterfrom
oxalica:fix/binfmt-argv0

Conversation

@oxalica
Copy link
Contributor

@oxalica oxalica commented Apr 9, 2021

Motivation for this change

Currently when preserveArgvZero is enabled, the prepended argv0 is directly pass to QEMU as exec -- ${interpreter} "$@", which makes it actually interpreted as argv1.
This PR fix the interpreter script to correctly pass argv0 to QEMU, only when the default QEMU interpreter is used.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Apr 9, 2021
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Apr 9, 2021
@stale
Copy link

stale bot commented Oct 12, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 12, 2021
@oxalica
Copy link
Contributor Author

oxalica commented Oct 12, 2021

Still relevant.

@oxalica oxalica requested a review from matthewbauer October 12, 2021 14:47
@oxalica oxalica removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 12, 2021
@oxalica
Copy link
Contributor Author

oxalica commented Oct 28, 2021

Close in favor of #143060, which is a superset of this.

@oxalica oxalica closed this Oct 28, 2021
@oxalica oxalica deleted the fix/binfmt-argv0 branch October 28, 2021 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant